{% extends 'layout.html' %}

{% block content %}
        <div class="container">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">{{ title }}</h3>
            </div>
            <div class="panel-body" style="padding-left: 30px">
{#            novalidate 关闭浏览器做的检验错误提示[ 意思是不让浏览器给我们做校验#}
                <form method="post" enctype="multipart/form-data" novalidate>
                    {% csrf_token %}
                    {% for item in form %}
                    <div class="form-group">
                        <label>{{ item.label }}: </label>
                        {{ item }}
                        <span style="color: red">{{ item.errors.0 }}</span>
{#                        <input type="text" class="form-control" placeholder="用户名" name="name">#}
                    </div>
                    {% endfor %}
                    <button type="submit" class="btn btn-success">保存</button>
                </form>
            </div>
        </div>
    </div>

{% endblock %}
